#include <ESP32Servo.h>

void mt_play_open()
{
    Servo myservo1;
    Servo myservo2;
    myservo1.attach(16);
    myservo2.attach(4);

    for (int pos = 45; pos <= 120; pos += 1)
    { // goes from 0 degrees to 180 degrees
        // in steps of 1 degree
        myservo1.write(pos);
        myservo2.write(120 - pos);
        // tell servo to go to position in variable 'pos'
        delay(15); // waits 15ms for the servo to reach the position
    }
    myservo1.detach();
    myservo2.detach();
}

void mt_play_close()
{
    Servo myservo1;
    Servo myservo2;
    myservo1.attach(16);
    myservo2.attach(4);

    for (int pos = 45; pos <= 120; pos += 1)
    { // goes from 0 degrees to 180 degrees
        // in steps of 1 degree
        myservo1.write(120 - pos);
        myservo2.write(pos);
        // tell servo to go to position in variable 'pos'
        delay(15); // waits 15ms for the servo to reach the position
    }
    myservo1.detach();
    myservo2.detach();
}